-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove extraneous content from block switcher aria menu #67647
base: trunk
Are you sure you want to change the base?
Conversation
d4f15dd
to
e186f05
Compare
Size Change: +135 B (+0.01%) Total Size: 1.84 MB
ℹ️ View Unchanged
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Can you include a before/after for comparison? I'm not sure what I'm looking at here. |
The 'before' screenshots are on the associated issue #67579 |
0b0448c
to
58c1fc7
Compare
Instead of hunting, it'd be great if you brought these front-and-center, so reviewers understand what you are changing when there are visual changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not an appropriate design for this change. It cannot scale well, particularly when there is any other elements rendered in the block card. Nor is it particularly helpful having this buried in the block transforms menu.
I propose just removing it as originally intended, but not adding it to the block card.
There are existing patterns we could potentially explore as follow-ups, such as following the block name convention ("Main (Group)") with "Connected" or rendering the connected icon (or the "Connected" label perhaps) in a badge to the right of the block name, as seen in List view for anchor links. I lean towards the latter, if this is significant enough to render.
I'm glad with any design the design team may want to provide for the 'connected' info, as long as it is easily discoverable and accessible. To me, the main goal is removing the extraneous, invalid, content from the ARIA menu. I'm also planning to create a follow-up to propose some linting tool to prevent other cases of invalid content within ARIA menus. I'd appreciate the design team to add to the guidelines that ARIA menus aren't the place for additional, extraneous, information that breaks the ARIA menu pattern.
I'm fine with removing it from the ARIA menu. However, an alternative design needs to be provided. Otherwise, there's no indication at all that a block is connected other than a different color of the block switcher icon in the block toolbar. That wouldn't be OK. I think in previous conversations some contributors, including myself, already pointed out a few times that providing feedback by just saying 'No' isn't helpful. Design is about solving problems. Just removing this info doesn't solve the problem. Please provide an alternative option. Cc @WordPress/gutenberg-design |
58c1fc7
to
1a10a0f
Compare
I echo Rich, proposing to remove the notice. In the case of an empty menu, that means the menu disappears. That proposal is based on reducing the number of variables in the UI. |
@richtabor can you please clarify what are the required code changes you asked for by submitting your code review? I don't see any. Thanks. |
@jasmussen I'm confused. What empty menu? We're discussing a place where to relocate the 'connected info' to. There must be a textual information that a block is connected. Can you please clarify? Thanks, |
1a10a0f
to
4cefff5
Compare
4cefff5
to
467bf1d
Compare
This PR still waits for an actionable design feedback. |
Flaky tests detected in fc36e63. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12414148623
|
Interesting. It would be nice to use the new Badge component for that, but it doesn't accept custom icons or colors. Would the 'info' badge fit this case? See the Storybook at https://wordpress.github.io/gutenberg/?path=/story/components-badge--info |
I was thinking that including the And you're right, So yes, perhaps the info badge could work here. |
467bf1d
to
fc36e63
Compare
Related also to the badge added in #65641 I would prefer the badges extra info to be placed outside from teh heading. The heading should only contain the block name, while at the moment contains also extra stuff that make the meaning of the heading not ideal. E.g,: I guess it can be adjusted in this PR after any further design feedback has been addressed. Cc @getdave @t-hamano |
Questioning this. Why does "Connected" need to be shown, when it does not carry any weight or meaning other than indicating the block data source is externally sourced? Wouldn't it be more helpful to see the actual values it's connected to? As is already the case in the "Attributes" panel. "Connected" carries no meaning on its own, without that additional context. |
To me, there must be a clear indication that a block is connected. The mere presence of the Attributes section in the settings panel is not sufficient. I would love to see the 'connected' info be even more prominent in the canvas as the only indication there so far is the different color of the block switcher button icon, which is only color and not sufficient. @WordPress/gutenberg-design I would appreciate receiving consistent and non-contradictory feedback because going back and forth to update a PR every time someone changes their mind on details that I would consider really minor is honestly frustrating. I will put this PR on hold. Please do let me know when there's some agreement on the design. Thanks. |
Regarding the most appropriate terminology to use, I would like to remind everyone that for the WordPress 6.7 release this feature has been presented to the public as the ability to connect blocks and custom fields. As such, I think the same terminology must be used in the UI. Quoting from the release post:
|
I'll defer to Rich if he feels strongly about not highlighting this detail in the block card 👍 |
I kindly insist: there must be a textual indication of the 'connected' info somewhere. Please eitehr provide an alternative approach or I'd suggest to keep the Badge. Thanks. |
You have indicated why—which is what I am questioning. Why is it important to see "Connected" in the block card? If it does nothing, does it need to be there? We should not populate the UI with more information, without deeply understanding the value of that additional UI.
It's critical to stress the details; something we can all be better at. I'm merely asking a question to validate the purpose of what you'd like to add. I would think we could do this amicably. |
If color alone isn’t enough, how about including some text in the |
I think something like that is interesting. |
Fixes #67579
What?
The block switcher menu contains informative paragraphs that break the ARIA menu pattern.
Why?
The block switcher menu is an ARIA menu and should only contain menu items. Any other content such as paragraphs etc. should not be part of an ARIA menu and should be moved elsewhere.
How?
BlockSwitcherDropdownMenuContents
toBlockSwitcher
. This is necessary to disable the menu when there are no transforms.Design Cc @WordPress/gutenberg-design
So far, I moved the 'is connected' message to the settings panel card and used the 'connection' icon. Any design feedback welcome. Screenshot:
Testing Instructions
Header
.Testing Instructions for Keyboard
Screenshots or screencast
The block switcher menu when: